﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Steve.UI.Controllers;
using System.Web.Mvc;
using Steve.UI.Models;
using System.ComponentModel.Composition;
using Microsoft.ComponentModel.Composition.Extensions.Web;
using Steve.UI.Administration.Controllers;
using Steve.UI.Administration.Models;

namespace Steve.UI.Site.Controllers
{
    [SiteMasterData]
    [Authorize(Roles = "Steve-Category Writer, Steve-Category Reader, Steve-Sys Admin")]
    [Export(typeof(IController))]
    [ExportMetadata("Name", "CategoryManagement")]
    [ExportMetadata("Mode", WebScopeMode.Request)]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public class CategoryManagementController : CategoryManagementControllerBase
    {
        [Authorize(Roles = "Steve-Category Writer, Steve-Sys Admin")]
        public override ActionResult CategoryDetailPost(ExistingCategoryDetailModel model, string id)
        {
            return base.CategoryDetailPost(model, id);
        }

        [Authorize(Roles = "Steve-Category Writer, Steve-Sys Admin")]
        public override ActionResult CategoryDetailPost(NewCategoryDetailModel model)
        {
            return base.CategoryDetailPost(model);
        }
    }
}